package com.xunua.NaoZiKongBai.LoginActivity;

import android.content.Context;

import com.xunua.NaoZiKongBai.Base.BasePresenter;

/**
 * @user XUNUA
 * @email xunua@outlook.com
 * @creat time 2020/5/13 17:50
 */
public class LoginPresenter extends BasePresenter<LoginModel,LoginActivity,LoginContract.VP> {
    @Override
    public LoginModel getModelInstance() {
        return new LoginModel(this);
    }

    @Override
    public LoginContract.VP getContract() {
        return new LoginContract.VP() {
            @Override
            public void requestLogin(String name, String pwd, Context context) {
                mModel.getContract().requestLogin(name,pwd,context);
            }

            @Override
            public void responseLoginResult(boolean loginStatusResult,boolean isban) {
                mView.getContract().responseLoginResult(loginStatusResult,isban);
            }
        };
    }
}
